home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / _GUICtrlComboSetMinVisible.au3 < prev    next >
Encoding:
Text File  |  2006-06-17  |  699 b   |  30 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt ('MustDeclareVars', 1)
  5.  
  6. Dim $Min = 5, $Combo, $ret, $Btn_Exit, $msg, $ret, $Btn_Set
  7.  
  8. GUICreate("ComboBox Set Min Visible", 392, 254)
  9.  
  10. $Combo = GUICtrlCreateCombo("", 70, 10, 270, 120)
  11. $ret = _GUICtrlComboAddDir ($Combo, "drives")
  12. $Btn_Set = GUICtrlCreateButton("Set", 150, 160, 90, 30)
  13. $Btn_Exit = GUICtrlCreateButton("Exit", 150, 200, 90, 30)
  14. GUISetState()
  15. While 1
  16.     $msg = GUIGetMsg()
  17.     Select
  18.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  19.             ExitLoop
  20.         Case $msg = $Btn_Set
  21.             _GUICtrlComboSetMinVisible ($Combo, $Min)
  22.             If ($Min == 5) Then
  23.                 $Min = 30
  24.             Else
  25.                 $Min = 5
  26.             EndIf
  27.     EndSelect
  28. WEnd
  29. Exit
  30.